package com.lely.springcloud.service;

import com.common.result.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author zzyy
 * @create 2020-02-19 23:59
 */
@Component
@FeignClient(value = "MYPROVIDE-SERVICE",fallback = PaymentFallbackService.class)
public interface PaymentFeignService {

    /**  根据id查询  */
    @GetMapping(value = "payment/get/{id}")
    R getPaymentById(@PathVariable("id") Long id);

    /**  模拟feign超时 */
    @GetMapping(value = "/payment/feign/timeout")
    String paymentFeignTimeout();
}
